package com.awn.weidian.demo.mapper;

import java.util.List;

import com.awn.weidian.demo.pojo.GoodsClass;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;


@Mapper
public interface IGoodsClass {
    @Select("select * from goodsclass")
    public List<GoodsClass> showAll();

    @Select("select * from hierarchy where cid=#{aa}")
    public GoodsClass findcid(String aa);

    @Insert("insert into goodsclass (cid,cname,father,classicon) values (#{cid},#{cname},#{father},#{classicon})")
    public int addAll(GoodsClass GoodsClass);

    @Delete("delete from goodsclass where cid = #{cid}")
    public int delAll(int gid);

    @Update("update goodsclass set cname=#{cname},father=#{father},classicon=#{classicon} where cid=#{cid}")
    public int updateAll(GoodsClass GoodsClass);
}
